package com.ease.component.controls.errordialogclasses {
   [Bindable]
   public class ErrorListItem {
      public function ErrorListItem(message:String, time:String, details:String = null,
                                    error:Error = null) {
         this.message = message;
         this.time = time;
         this.details = details;
         this.error = error;
      }

      private var _message:String;
      /**
       * Error message
       */
      public function get message():String {
         return _message;
      }

      public function set message(value:String):void {
         _message = value;
      }

      private var _time:String;
      /**
       * Client time when the error has been generated
       */
      public function get time():String {
         return _time;
      }

      public function set time(value:String):void {
         _time = value;
      }

      private var _details:String;
      /**
       * Details of the error
       */
      public function get details():String {
         return _details;
      }

      public function set details(value:String):void {
         _details = value;
      }

      private var _error:Error;
      /**
       * Error return from backend
       */
      public function get error():Error {
         return _error;
      }

      public function set error(value:Error):void {
         _error = value;
         if (_details == null && _error != null) {
            details = _error.getStackTrace();
         }
      }
   }
}